<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <!--从 CDN 引入 vue.js -->
    <script src="https://unpkg.com/vue"></script>
</head>
<body>

    <div id="app">
        <myheader></myheader>

        <div>main</div>

        <myfooter></myfooter>
    </div>

    <script>

        Vue.component("myheader",{
            template : `<h1>myHeader</h1>`
        });

        Vue.component("myfooter",{
            template : `<h1>myfooter</h1>`
        });

        let app = new Vue({
            el:"#app"
        });


    </script>
</body>
</html>